# Copyright 2022 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library")

package(
    default_visibility = ["//visibility:public"],
    features = ["layering_check"],
    licenses = ["notice"],  # Apache 2.0
)

iree_compiler_cc_library(
    name = "Options",
    srcs = ["Options.cpp"],
    hdrs = ["Options.h"],
    deps = [
        "//compiler/src/iree/compiler/Utils",
        "@llvm-project//llvm:Passes",
    ],
)

iree_compiler_cc_library(
    name = "Pipelines",
    srcs = [
        "Pipelines.cpp",
    ],
    hdrs = [
        "Pipelines.h",
    ],
    deps = [
        ":Options",
        "//compiler/src/iree/compiler/Bindings/Native/Transforms",
        "//compiler/src/iree/compiler/Bindings/TFLite/Transforms",
        "//compiler/src/iree/compiler/Dialect/Flow/Transforms",
        "//compiler/src/iree/compiler/Dialect/HAL/Conversion/HALToVM",
        "//compiler/src/iree/compiler/Dialect/HAL/Target",
        "//compiler/src/iree/compiler/Dialect/HAL/Transforms",
        "//compiler/src/iree/compiler/Dialect/Stream/Transforms",
        "//compiler/src/iree/compiler/Dialect/Util/Transforms",
        "//compiler/src/iree/compiler/Dialect/VM/Conversion",
        "//compiler/src/iree/compiler/Dialect/VM/Target/Bytecode",
        "//compiler/src/iree/compiler/Dialect/VM/Transforms",
        "//compiler/src/iree/compiler/DispatchCreation",
        "//compiler/src/iree/compiler/GlobalOptimization",
        "//compiler/src/iree/compiler/InputConversion/Common",
        "//compiler/src/iree/compiler/InputConversion/Common:AutoInputConversionPipeline",
        "//compiler/src/iree/compiler/Modules/HAL/Inline/Transforms",
        "//compiler/src/iree/compiler/Modules/HAL/Loader/Transforms",
        "//compiler/src/iree/compiler/Preprocessing:Passes",
        "//compiler/src/iree/compiler/Utils",
        "@llvm-project//llvm:Support",
        "@llvm-project//mlir:IR",
        "@llvm-project//mlir:Pass",
        "@llvm-project//mlir:Support",
    ],
)
